#ifndef __SIS3801__
#define __SIS3801__

#include <cstdlib>
#include <iostream>
#include <sstream>
#include <cstdio>

class SIS3801{
 public:
  SIS3801();
  SIS3801(const char *char_wrd);
  ~SIS3801();

  void Decode(const char *char_wrd);
  std::string GetDecodedData() {return return_decoded_data;};
 

 private: 
  static const unsigned int SIS3801_USERBIT_MASK;
  static const unsigned int SIS3801_BANK_NUMBER_MASK;
  static const unsigned int SIS3801_CHANNEL_NUMBER_MASK;
  static const unsigned int SIS3801_DATA_MASK;
 
  unsigned int  user_bit;
  unsigned int  bank_number;
  unsigned int  channel_number;
  unsigned int  data;
 
  std::string         return_decoded_data;
  std::ostringstream  decoded_stream;
 
  bool data_input_flag;
  
  unsigned int BitMaskShift(long int wrd, unsigned int mask, unsigned short shift)
  {
    return ( (wrd&mask)>>shift );
  }

  
};



#endif
